package com.example.demo;

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;

public class ConnectServer implements Runnable{
	private int Port = 12345;
	private String IP = "192.168.1.4";
	private Myapplication application= new Myapplication();

	public ConnectServer(Myapplication app){
		
		this.application=app;
	}
	public void run() {
		try {
			//this.application.setSocket(new Socket(IP, Port)) ;
			Socket sc =new Socket(IP, Port);
			this.application.setSocket(sc); 
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
